#include <iostream>
#include <cstring>
using namespace std;
const int N = 1e5 + 10;

int n, m;
int h[N], e[N], ne[N], idx, in[N];
int q[N], hh, tt;

void add(int a, int b)
{
    e[idx] = b; ne[idx] = h[a]; h[a] = idx ++; in[b]++;
}

bool topsort()
{
    for(int i = 1; i <= n; ++i) if(in[i] == 0) q[tt++] = i;
    while(hh < tt)
    {
        int cur = q[hh++];
        for(int i = h[cur]; i != -1; i = ne[i])
        {
            int j = e[i];
            if(--in[j] == 0) q[tt++] = j;
        }
    }
    return n == tt;
}

int main()
{
    memset(h, -1, sizeof(h));
    cin >> n >> m;
    
    while(m--)
    {
        int a, b; cin >> a >> b;
        add(a, b);
    }
    
    if(topsort())
        for(int i = 0; i < n; ++i) cout << q[i] << ' ';
    else
        cout << -1;
    return 0;
}